package com.naiterui.ehp.bs.pharmacist.feign;

import com.naiterui.ehp.bp.bo.recommend.param.RecomAuditParamBO;
import com.naiterui.ehp.bp.support.config.FeignConfiguration;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.pharmacist.vo.recommend.PrescriptionDetailVO;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Description 调用处方服务
 * @Author gongbaoqiang
 * @Date 2019/12/5 9:33 PM
 */
@FeignClient(name = "pharmacistRecomment", url = "${ehp.domain.tuijian}", configuration = FeignConfiguration.class)
public interface PharmacistRecommendFeignClient {

    /**
     * <pre>
     *     处方审核
     * </pre>
     *
     * @param bo
     *
     * @throws BusinessException
     */
    @PostMapping("inner/pharmacist/audit")
    void audit(@RequestBody RecomAuditParamBO bo) throws BusinessException;

    /**
     * <pre>
     *     处方笺详情
     * </pre>
     *
     * @param recommendId
     *
     * @throws BusinessException
     */
    @PostMapping("inner/pharmacist/prescription/detail")
    PrescriptionDetailVO getPrescriptionDetail(@RequestParam(value = "recommendId") Long recommendId) throws BusinessException;

    @PostMapping("inner/recom/addLog")
    void recomAddlog(@RequestParam("recomId") Long recomId, @RequestParam("operator") String operator,
                @RequestParam("type") Integer type, @RequestParam("name") String name) throws BusinessException;
}
